﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class en_ViewNews : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            FillControls();
        }
    }

    private void FillControls()
    {
        string url = HttpContext.Current.Request.Url.Query;
        url = url.Substring(4);
        int index = Convert.ToInt32(url);

        Record edit = Record.GetEnRecord(index);
        Record.saveIndex(index);

        TextBox1.Text = edit.Title;
        TextBox2.Text = edit.Content;

    }
}
